-- Backpack Mod
-- by Fontonkonbonmon
-- Updated by WrathOf for 'The End is Nigh' update
-- v8
-------------------------------------------------------------------------------

function backpackpostinit(inst)
	print "backpack prefabs mod running"	
	inst.components.equippable.equipslot = GLOBAL.EQUIPSLOTS.BACK
end

function krampussackpostinit(inst)
	print "krampus_sack prefabs mod running"	
	inst.components.equippable.equipslot = GLOBAL.EQUIPSLOTS.BACK
end

function piggybackpostinit(inst)
	print "piggyback prefabs mod running"	
	inst.components.equippable.equipslot = GLOBAL.EQUIPSLOTS.BACK
end

function inventorypostinit(component,inst)
	print "inventory component mod running!"
	
	inst.components.inventory.numequipslots = 4
end

function gamepostinit()
	print "Add new icon! thanks for using Personal Backpack Slot Mod V7.1"
	GLOBAL.TheSim:LoadPrefabDefs( MODROOT.."prefabs.xml")
end


AddComponentPostInit("inventory", inventorypostinit)

AddPrefabPostInit("backpack", backpackpostinit)
AddPrefabPostInit("krampus_sack", krampussackpostinit)
AddPrefabPostInit("piggyback", piggybackpostinit)

AddSimPostInit(gamepostinit)


table.insert(GLOBAL.EQUIPSLOTS, "BACK")
GLOBAL.EQUIPSLOTS.BACK = "back"


